<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>就诊人信息</title>
    <!--浏览器小图标-->
    <link rel="shortcut icon" href="/img/favicon.png">
    <!--自定义样式-->
    <!--  <link rel="stylesheet" href="/css/index.css">-->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <!-- 引入Element UI样式 -->
    <link rel="stylesheet" href="/element/element-ui.css">
</head>
<body>
<div>
    <el-row>
        <el-col :span="8">
            <el-form ref="form" :model="form" label-width="80px">
                <el-form-item label="姓名">
                    <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="性别">
                    <el-select v-model="form.gender" placeholder="请选择性别">
                        <el-option label="女" value="woman"></el-option>
                        <el-option label="男" value="man"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="身份证号">
                    <el-input v-model="form.identityCard"></el-input>
                </el-form-item>
                <el-form-item label="出生日期">
                    <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="form.date1"
                                        style="width: 100%;"></el-date-picker>
                    </el-col>
                    <el-col class="line" :span="2">-</el-col>
                </el-form-item>
                <el-form-item label="手机号码">
                    <el-input v-model="form.phone"></el-input>
                </el-form-item>
                <el-form-item label="家庭住址">
                    <el-input type="textarea" v-model="form.address"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="onSubmit">立即添加</el-button>
                    <el-button>取消</el-button>
                </el-form-item>
            </el-form>
<!--            <el-row v-if="registered">-->
<!--                <el-col>-->
<!--                    <el-result icon="success" title="添加成功">-->
<!--                        <template slot="subTitle">-->
<!--                            <el-link type="primary" :underline="false">【查看就诊人信息】</el-link>-->
<!--                        </template>-->
<!--                    </el-result>-->
<!--                </el-col>-->
<!--            </el-row>-->
<!--            <el-dialog>-->
<!--    <span slot="footer" class="dialog-footer" v-if="!registered">-->
<!--                    <el-button @click="dialogVisible = false">取 消</el-button>-->
<!--                    <el-button type="primary" @click="confirmRegistered">确认添加</el-button>-->
<!--                </span>-->
<!--            </el-dialog>-->
        </el-col>
    </el-row>


    <!--    &lt;!&ndash;添加成功/失败提示框&ndash;&gt;-->

    <!--成功对话框 错误对话框-->
</div>
</body>
<!-- 引入Vue和Element UI库 -->
<script src="/js/vue.js"></script>
<script src="/element/element-ui.js"></script>
<!--引入axios框架文件-->
<script src="/js/axios.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            form: {
                gender: '',
                name: '',
                region: '',
                date1: '',
                date2: '',
                delivery: false,
                type: [],
                resource: '',
                desc: '',
                identityCard: '',
                address: '',
                phone: '',
            }
        },
        methods: {
            onSubmit() {
                axios.post("",v.form).then(function (rec) {
                    if (rec.data.code===1){

                    }
                })
            }
        }
    })
</script>
</html>